﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Core.DS
{
    public static partial class classes
    {
        public static dynamic deleteStudent(int cid, string sid)
        {
            var sql = new Sql.SqlDataContext();
            var s = sql.DSClassStudent.FirstOrDefault(row => row.cid == cid && row.sid == sid);
            if (s == null) return new
            {
                success = false,
                msg = "学生不存在"
            };
            sql.DSClassStudent.DeleteOnSubmit(s);
            sql.SubmitChanges();
            return new
            {
                success = true
            };
        }
    }
}
